home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / tools.lha / tools / debug.h next >
C/C++ Source or Header  |  1993-08-08  |  327b  |  24 lines

  1. ifndef DEBUG_H
  2. define DEBUG_H
  3. ifdef __cplusplus
  4. xtern "C" {
  5. endif
  6. xtern char *getenv(const char*);
  7. xtern int atoi(const char*);
  8. ifdef __cplusplus
  9.  
  10. endif
  11.  
  12. lass debugC {
  13.    int i;
  14. ublic:
  15.    debugC() {
  16. char *x = getenv("DEBUG");
  17. i = x ? atoi(x) : 0;
  18.    }
  19.    operator int() { return i; }
  20. ;
  21.  
  22. tatic debugC debug;
  23. endif /* DEBUG_H */
  24.